unit UModule_Profile;

interface

uses
  Dialogs,
  SysUtils,
  Classes,
  ActnList;

type
  TModule_Profile = class(TDataModule)
    ActionList1: TActionList;
    Action1: TAction;
    Action2: TAction;
    PFile_LogOut: TAction;
    procedure PFile_LogOutExecute(Sender: TObject);
  private
    procedure Assign_LoginInfo;
  public
    procedure Assign_Action;
  end;

var
  Module_Profile: TModule_Profile;

implementation

uses
  UMainApplication,
  UUser;
{$R *.dfm}

procedure TModule_Profile.Assign_Action;
begin
try
  with Form_Main do
    begin
    with CB010501 do
      begin
      with Categories[0] do
        begin
        Items[2].Action := PFile_LogOut;
        end;
      end;
    end;
except
  on E: Exception do
    begin
    ShowMessage(E.Message);
    end;
end;
end;

procedure TModule_Profile.Assign_LoginInfo;
begin
try
  with Form_Main do
    begin
    GServer_Host     := IN010301.Text;
    GServer_Database := IN010302.Text;
    GServer_UserName := IN010303.Text;
    GServer_Password := IN010304.Text;
    GUserName        := LE01010101.Text;
    GUserPassword    := LE01010102.Text;
    end;
except
  on E: Exception do
    begin
    ShowMessage(E.Message);
    end;
end;
end;

procedure TModule_Profile.PFile_LogOutExecute(Sender: TObject);
begin
try
  with Form_Main, LE01010101 do
    begin
    Show;
    SetFocus;
    end;
except
  on E: Exception do
    begin
    ShowMessage(E.Message);
    end;
end;
end;

end.
